using System.Collections.ObjectModel;
using Chaotic.DataBase.DBAccessLibrary.Model;

namespace Chaotic.DataBase.DBAccessLibrary.DBAccessLibrary;

public static class SysCache
{
	private static ConnectionModel? _connection;

	public static ConnectionModel? DBConnection
	{
		get
		{
			//if (_connection == null)
			//{
			//	throw new Exception("请先连接一个数据库再进行此操作");
			//}
			return _connection;
		}
		set => _connection = value;
    }

	public static IEnumerable<TableEntity>? TableList { get; set; }

	public static IEnumerable<ProcEntity>? ProcList { get; set; }

	public static IEnumerable<ViewEntity>? ViewList { get; set; }

	public static IEnumerable<TypeInfoEntity>? TypeList { get; set; }

	public static ObservableCollection<DataBaseEntity>? ServerList { get; set; }
}
